package cn.sunlelin.educationserver.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

public class Task {
    private Integer taskId;
    private String taskName;
    private Integer courseId;
    private Integer chapterId;
    private String deadline;
    private Float score;
    private Integer submitnum;
    private String content;
    private String answer;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:SS", timezone = "Asia/Shanghai")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:SS", timezone = "Asia/Shanghai")
    private Date updateTime;
    private String delFlag;

    public Task() {
    }

    public Task(Integer taskId, String taskName, Integer courseId, Integer chapterId, String deadline, Float score, Integer submitnum, String content, String answer, Date createTime, Date updateTime, String delFlag) {
        this.taskId = taskId;
        this.taskName = taskName;
        this.courseId = courseId;
        this.chapterId = chapterId;
        this.deadline = deadline;
        this.score = score;
        this.submitnum = submitnum;
        this.content = content;
        this.answer = answer;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.delFlag = delFlag;
    }

    public Integer getTaskId() {
        return taskId;
    }

    public void setTaskId(Integer taskId) {
        this.taskId = taskId;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public Integer getChapterId() {
        return chapterId;
    }

    public void setChapterId(Integer chapterId) {
        this.chapterId = chapterId;
    }

    public String getDeadline() {
        return deadline;
    }

    public void setDeadline(String deadline) {
        this.deadline = deadline;
    }

    public Float getScore() {
        return score;
    }

    public void setScore(Float score) {
        this.score = score;
    }

    public Integer getSubmitnum() {
        return submitnum;
    }

    public void setSubmitnum(Integer submitnum) {
        this.submitnum = submitnum;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Override
    public String toString() {
        return "Task{" +
                "taskId=" + taskId +
                ", taskName='" + taskName + '\'' +
                ", courseId=" + courseId +
                ", chapterId=" + chapterId +
                ", deadline='" + deadline + '\'' +
                ", score=" + score +
                ", submitnum=" + submitnum +
                ", content='" + content + '\'' +
                ", answer='" + answer + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", delFlag='" + delFlag + '\'' +
                '}';
    }
}
